package com.example.demo.mapper;

import com.example.demo.model.MessageInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * ClassName: MessageMapper
 * Package: IntelliJ IDEA
 * Description:
 *
 * @Author 谷京京
 * @Create 2023/11/17 22:46
 * @Version 1.0
 */
@Mapper
public interface MessageMapper {
    @Insert("insert into message_info(`from`, `to`, `message`) values (#{from}, #{to}, #{message})")
    public void insertMessage(MessageInfo messageInfo);
    @Select("select * from message_info where delete_flag = 0")
    public List<MessageInfo> selectAllMessage();
}
